package jdk.features.jdk8;

import java.io.*;

public class Case002_New
{
    public static void main(String[] args) throws FileNotFoundException
    {
        String filePath = "d:/1.txt";
        String outfilePath = "d:/2.txt";

        InputStream in = new FileInputStream(filePath);
        OutputStream out = new FileOutputStream(outfilePath);

        try (in; out) {
            System.out.println(in);
            System.out.println(out);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
